﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FridgeManagerApp
{
    [DataContract]
    public class WSoldNote : NotificationObject
    {
        private String soldUID;
        private String openID;
        private int officeUID;
        private int deviceUID;
        private String dominoUID;
        private float soldPrice;
        private int status;
        private String soldTime;

        [DataMember(Order = 0)]
        public String SoldUID
        {
            get
            {
                return soldUID;
            }
            set
            {
                soldUID = value;
                RaisePropertyChanged("SoldUID");
            }
        }

        [DataMember(Order = 1)]
        public String OpenID
        {
            get
            {
                return openID;
            }
            set
            {
                openID = value;
                RaisePropertyChanged("OpenID");
            }
        }

        [DataMember(Order = 2)]
        public int OfficeUID
        {
            get
            {
                return officeUID;
            }
            set
            {
                officeUID = value;
                RaisePropertyChanged("OfficeUID");
            }
        }

        [DataMember(Order = 3)]
        public int DeviceUID
        {
            get
            {
                return deviceUID;
            }
            set
            {
                deviceUID = value;
                RaisePropertyChanged("DeviceUID");
            }
        }

        [DataMember(Order = 4)]
        public String DominoUID
        {
            get
            {
                return dominoUID;
            }
            set
            {
                dominoUID = value;
                RaisePropertyChanged("DominoUID");
            }
        }

        [DataMember(Order = 5)]
        public float SoldPrice
        {
            get
            {
                return soldPrice;
            }
            set
            {
                soldPrice = value;
                RaisePropertyChanged("SoldPrice");
            }
        }

        [DataMember(Order = 6)]
        public int Status
        {
            get
            {
                return status;
            }
            set
            {
                status = value;
                RaisePropertyChanged("Status");
            }
        }

        [DataMember(Order = 7)]
        public String SoldTime
        {
            get
            {
                return soldTime;
            }
            set
            {
                soldTime = value;
                RaisePropertyChanged("SoldTime");
            }
        }

        public WSoldNote()
        {
            SoldUID = "";
            OpenID = "";
            OfficeUID = -1;
            DeviceUID = -1;
            DominoUID = "";
            SoldPrice = -1;
            Status = -1;
            SoldTime = "";
        }

        public WSoldNote(LSoldNote p)
        {
            SoldUID = p.SoldUID;
            OpenID = p.OpenID;
            OfficeUID = p.OfficeUID;
            DeviceUID = p.DeviceUID;
            DominoUID = p.DominoUID;
            SoldPrice = p.SoldPrice;
            Status = p.Status;
            SoldTime = p.SoldTime;
        }
    }
}
